﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PPSMS_DAL
{
    public static class DateExtends
    {
        public static string GetDay(this string date)
        {
            //yyyy-MM-dd-HH-mm-ss
            string[] dateArr = date.Split('-');
            return dateArr[2];  
        }
        public static string GetMonth(this string date)
        {
            //yyyy-MM-dd-HH-mm-ss
            string[] dateArr = date.Split('-');
            return dateArr[1];
        }
        public static string GetYear(this string date)
        {
            //yyyy-MM-dd-HH-mm-ss
            string[] dateArr = date.Split('-');
            return dateArr[0];
        }
    }
}
